package com.neu.controller;

import com.neu.base.Result;
import com.neu.entity.DTO.TaskDTO;
import com.neu.service.CommonTaskService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/commonTask")
@Tag(name = "公共任务管理")
public class CommonTaskController {
    @Autowired
    private CommonTaskService commonTaskService;

    @PostMapping("/updateProgress")
    @Operation(summary = "更新任务进度")
    public Result updateProgress(@RequestBody TaskDTO taskDTO) {

        return commonTaskService.updateProgress(taskDTO);
    }
}
